package com.xmmj.common.converter

import java.lang.RuntimeException

/**
 * 表示请求错误时，返回的数据模型
 * （具体还得根据实际项目接口来重构下面的数据模型）
 */
class ResponseError : RuntimeException {
    var code = 0
    override var message: String? = null
    var data: String? = null

    constructor() {}

    constructor(bean: ResponseBean) {
        this.code = bean.code
        this.message = bean.message
        this.data = bean.data
    }

    constructor(code: Int, message: String?) {
        this.code = code
        this.message = message
    }

    override fun toString(): String {
        return "RequestError{" +
                "message='" + message + '\'' +
                ",code=" + code +
                ",data='" + data + '\'' +
                '}'
    }
}